package com.github.cyf.entity;

import com.github.cyf.desensition.Desensitization;
import com.github.cyf.desensition.DesensitizedType;
import lombok.*;

/**
 * @author chenyifan
 * @create 2024-05-08 22:10
 */
@Data
@Builder
@ToString
@AllArgsConstructor
@NoArgsConstructor
public class DesensitizationEntity {

    @Desensitization(type = DesensitizedType.CHINESE_NAME)
    private String userName;

    @Desensitization(type = DesensitizedType.ADDRESS)
    private String address;

    @Desensitization(type = DesensitizedType.ID_CARD)
    private String idCard;

    @Desensitization(type = DesensitizedType.FIXED_PHONE)
    private String fixedPhone;

    @Desensitization(type = DesensitizedType.MOBILE_PHONE)
    private String mobilePhone;

    @Desensitization(type = DesensitizedType.EMAIL)
    private String email;

    @Desensitization(type = DesensitizedType.PASSWORD)
    private String password;

    @Desensitization(type = DesensitizedType.CAR_LICENSE)
    private String carLicense;

    @Desensitization(type = DesensitizedType.BANK_CARD)
    private String bankCard;

    @Desensitization(type = DesensitizedType.CUSTOM, startInclude = 3, endExclude = 9)
    private String custom;

    /**
     * 不进行数据脱敏的字段
     */
    private String noMask;

}
